<?php /* Smarty version 2.6.18, created on 2010-03-16 11:25:58
         compiled from tankinventory.tpl */ ?>
<?php require_once(SMARTY_CORE_DIR . 'core.load_plugins.php');
smarty_core_load_plugins(array('plugins' => array(array('function', 'cycle', 'tankinventory.tpl', 20, false),)), $this); ?>
<table class="popup" border="0" cellspacing=0 cellpadding=0>
	<tr><td><div class="pop">
		<div class="top_pop"><img src="/app/default/www/images/top_left_pop.jpg" /></div> 
		<div id="drag_bar"><h2 class="pop_h2">&nbsp;&nbsp;Tank Inventories</h2></div>
		<div class="content">			
			<table border="0" width="100%">
				<tr>
					<td width="30">Tank</td>
					<td width="20">MOID</td>
					<td width="20">SIZE</td>
					<td width="20">Inventory</td>
					<td width="10">Qty. Dispatch</td>
				</tr>
				<tr><td colspan=5><hr></td></tr>
			</table>
			<div id="scroll_content" style="overflow: auto;height:200px;">
				<table border="0" width="100%">									
					<?php $_from = $this->_tpl_vars['inventories']; if (!is_array($_from) && !is_object($_from)) { settype($_from, 'array'); }if (count($_from)):
    foreach ($_from as $this->_tpl_vars['item']):
?>
						<?php $this->assign('id', ($this->_tpl_vars['item']['inventory_id'])."_".($this->_tpl_vars['item']['moid'])."_".($this->_tpl_vars['item']['size_code'])); ?>
						<tr class=<?php echo smarty_function_cycle(array('values' => 'blue,notify'), $this);?>
>
							<td width="30"><?php echo $this->_tpl_vars['item']['tank_name']; ?>
</td>
							<td width="20"><?php echo $this->_tpl_vars['item']['moid']; ?>
</td>
							<td width="20"><?php echo $this->_tpl_vars['item']['size']; ?>
</td>
							<td width="20"><?php echo $this->_tpl_vars['item']['total_qty_on_hand']; ?>
</td>
							<td width="10"><input style="width:60px;text-align:right" type="text" name="qty[<?php echo $this->_tpl_vars['item']['inventory_id']; ?>
_<?php echo $this->_tpl_vars['item']['moid']; ?>
_<?php echo $this->_tpl_vars['item']['size_code']; ?>
]" value="<?php echo $this->_tpl_vars['dispatch'][$this->_tpl_vars['id']]; ?>
"></td>
						</tr>
					<?php endforeach; endif; unset($_from); ?>
					<tr><td height="10"></td></tr>
				</table>
			</div>
			<div align="center"><input type="button" value="Close" onclick="popup('tank');">&nbsp;<input type="button" value="Save" onclick="savewithdrawn();"></div>
		</div>
		<div class="btm_pop"><img src="/app/default/www/images/btm_left_pop.jpg"  alt="" />
	</div></td></tr>
</table>
<script language="javascript">
<?php echo '
	function savewithdrawn() {
		doajaxAction("/account/updateDispatch/poid/'; ?>
<?php echo $this->_tpl_vars['poid']; ?>
<?php echo '/customerId/'; ?>
<?php echo $this->_tpl_vars['customerId']; ?>
<?php echo '",1,\'detail\',document.getElementById(\'mainForm\'));
		popup(\'tank\');
	}
'; ?>

</script>
		